﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Brick_G : Generator
{
    public float Least_Second;
    public float Lower_Second;
    public float IntervalSeconds;
    float total;
    override protected void Start()
    {
        base.Start();
        total = IntervalSeconds;
    }
    private void FixedUpdate()
    {
        total -= Time.fixedDeltaTime;
        if (total <= 0)
        {
            Rotation.z += 45;
            //Debug.Log("Brick generate.");
            Generate();
            total = IntervalSeconds;
        }
        if (IntervalSeconds > Least_Second)
        {
            IntervalSeconds -= Lower_Second;
        }
    }
}
